Errors scheduling IBs
[email protected]
Reviewed-by Alex Deucherhttps://bugs.freedesktop.org/show_bug.cgi?id=96588
Bug ID: 96588
Summary: [regression] [amdgpu] Errors scheduling IBs
Product: DRI
Version: DRI git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/AMDgpu
Assignee: [email protected]
Reporter: [email protected]
Hi
I've been seeing these errors in my kernel logs:
amdgpu 0000:01:00.0: couldn't schedule ib [drm:amdgpu_job_run] *ERROR* Error scheduling IBs (-22) [drm:amd_sched_main] *ERROR* Failed to run job!
I've bisected it down to:
a7c77c7fe5f659428e73d77aa4a8ac80b638daf3 is the first bad commit commit a7c77c7fe5f659428e73d77aa4a8ac80b638daf3
Author: Christian König <[email protected]> Date: Wed Jun 15 13:44:05 2016 +0200
drm/amdgpu: pipeline evictions as well
This boosts Xonotic from 38fps to 47fps when artificially limiting VRAM to 256MB for testing. It should improve all CPU bound rendering situations where we have a lot of swapping to/from VRAM.
:040000 040000 2fdfd546d7175759ed5f09bdec209f71d084ab1e6b0cdbc8f42f4e3873e3bbdcc440336856073883 M drivers
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Mike Lothian <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Mike Lothian <[email protected]> --- Created attachment 124602
--> https://bugs.freedesktop.org/attachment.cgi?id=124602&action=edit
journalctl output
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #2 from Mike Lothian <[email protected]> --- Reverting that commit makes the errors go away
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #3 from Christian König <[email protected]> --- Could be some kind of race condition, please provide the output of "journalctl --dmesg -o short-monotonic".
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Mike Lothian <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #124602|0 |1
is obsolete| |
--- Comment #4 from Mike Lothian <[email protected]> --- Created attachment 124607
--> https://bugs.freedesktop.org/attachment.cgi?id=124607&action=edit
demsg output
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #5 from Christian König <[email protected]> --- Ok, clearly not a race condition but something is wrong here the cause the driver tries to initialize the ring buffers multiple times.
Maybe something is causing a GPU reset, but as far as I remember those should still be turned of by default.
Please provide a journalctl output from a boot with the patch in question reverted.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #6 from Mike Lothian <[email protected]> --- I should probably have specified this is a prime laptop with dynpm
The card initialises each time it's needed, it always does this during boot and again when X starts, and each time I load a game with DRI_PRIME=1
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #7 from Christian König <[email protected]> --- Ah, enlightenment! Thanks that was the info I was missing.
We probably just forget to wait for all evictions before we turn of the GPU resulting in the still running jobs to produce this error message.
Give me a second to hack together a patch.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Christian König <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #8 from Christian König <[email protected]> --- Created attachment 124616
--> https://bugs.freedesktop.org/attachment.cgi?id=124616&action=edit
Possible fix
Please test the attached patch it should fix the issue.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #9 from Mike Lothian <[email protected]> --- I'll test this tonight when I get home, thanks
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Mike Lothian <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #124607|0 |1
is obsolete| |
--- Comment #10 from Mike Lothian <[email protected]> --- Created attachment 124623
--> https://bugs.freedesktop.org/attachment.cgi?id=124623&action=edit
dmesg
Still seems to happen
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Christian König <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #11 from Christian König <[email protected]> --- I'm running out of ideas. Does that have any other negative results except for the error message?
Alex any idea what else could cause an eviction during switching of the dGPU?
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #12 from Alex Deucher <[email protected]> --- (In reply to Christian König from comment #11)
Quoted 4 lines
I'm running out of ideas. Does that have any other negative results except for the error message?
Alex any idea what else could cause an eviction during switching of the dGPU?
powering up/down the dGPU should hit the same code as resume/suspend. Are you seeing similar issues with suspend and resume? Maybe the scheduler isn't getting stopped properly on suspend? We recently fixed something like this for gpu reset.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Mike Lothian <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #124623|0 |1
is obsolete| |
--- Comment #13 from Mike Lothian <[email protected]> --- Created attachment 124672
--> https://bugs.freedesktop.org/attachment.cgi?id=124672&action=edit
dmesg
It seems to spam the logs more when I fire up a game
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #14 from Christian König <[email protected]> --- Created attachment 124708
--> https://bugs.freedesktop.org/attachment.cgi?id=124708&action=edit
Additional fix.
Alex suspend/resume idea was the right approach.
I was able to reproduce the issue and so find a pretty fundamental bug in one of my recent patches.
Please see the additional fix, together with the first patch it should resolve the issue.
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
--- Comment #15 from Mike Lothian <[email protected]> ---
The patch already seems to have landed in drm-next-4.8-wip and it does indeed seem to fix it
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=96588
Vedran Miletić <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED--- Comment #16 from Vedran Miletić <[email protected]> --- Marking as resolved per comment #15 and
https://cgit.freedesktop.org/~agd5f/linux/commit/?h=drm-next-4.8-wip&id=ce774d0254ed05ff6d3e3ce2c598aa4f79d45c3c
Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel